package cn.exrick.xboot.base.entity

import cn.exrick.xboot.core.base.XbootBaseEntityKt
import cn.exrick.xboot.core.common.constant.CommonConstant
import cn.exrick.xboot.core.common.utils.SnowFlakeUtil
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Table

/**
 * @author Fei
 */
@Entity
@Table(name = "en_business")
@TableName("en_business")
@ApiModel(value = "行业")
data class Business(

        @ApiModelProperty("行业名称")
        var businessName: String? = null,

        @ApiModelProperty("备注")
        var description: String? = null,

        @ApiModelProperty(value = "是否启用 0启用 -1禁用")
        var status:Int? = CommonConstant.STATUS_NORMAL

) : XbootBaseEntityKt() {

    @Id
    @TableId
    override var id: String = SnowFlakeUtil.nextId().toString()

    companion object {
        private const val serialVersionUID = 1L
    }
}